﻿using System;
using System.Collections.Generic;
using System.Text;
using QUANLYCHAMCONG.DAO.DAO;
using QUANLYCHAMCONG.BL.Entities;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class WORKTIMEBUS
    {
        public WORKTIMEBUS() { }
        public static bool Insert(WORKTIME wt)
        {
            WORKTIMEDAO dao = new WORKTIMEDAO();
            return dao.Insert(wt);
        }
        public static bool Update(WORKTIME wt)
        {
            WORKTIMEDAO dao = new WORKTIMEDAO();
            return dao.Update(wt);
        }
        public static bool Delete(WORKTIME wt)
        {
            WORKTIMEDAO dao = new WORKTIMEDAO();
            return dao.Delete(wt);
        }
        public static DataTable SelectAll()
        {
            WORKTIMEDAO dao = new WORKTIMEDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(WORKTIME wt)
        {
            WORKTIMEDAO dao = new WORKTIMEDAO();
            return dao.SelectByPK(wt);
        }
        public static string GetID()
        {
            WORKTIMEDAO dao = new WORKTIMEDAO();
            return "WT" + dao.GetID().ToString();
        }
    }
}
